<?php
namespace app\api\controller;
use \alipay\Pagepay;

class Index
{
    public function index()
    {
        $data = ['name'=>'thinkphp','url'=>'thinkphp.cn'];       
		return ['data'=>$data,'code'=>1,'message'=>'操作完成'];
    }
	public function alipay()
    {
        $o = mt_rand();
        $params['out_trade_no'] = $o;
        $params['subject'] = 'ceishi1';
        $params['total_amount'] = '0.01';
        $result = Pagepay::pay($params);
        echo $result;
    }
}
